<?php

include('confdb.php');

$vistuplenie_idvistuplenie = urldecode($_POST['vistuplenie_idvistuplenie']);
$vistuplenie_activno = urldecode($_POST['vistuplenie_activno']);

$con = mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db_name);
mysql_query("SET NAMES utf8");

if(!$con) {

die ('Ошибка подключения: '.mysql_connect_error());

}

$otvet=array();
$query = "UPDATE vistuplenie set vistuplenie_activno = '$vistuplenie_activno' where vistuplenie_idvistuplenie = '$vistuplenie_idvistuplenie'";

$result = mysql_query($query);

if($result){
    $otvet['success']=1;
    
} else { $otvet['success']=0; }
echo json_encode($otvet);



?>

